home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / rexx / 5 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: nntp.cs.ubc.ca!bcsystems!bcsystems!nntp
  2. Newsgroups: comp.lang.rexx
  3. Subject: Re: New rexx user, arrays, and o2
  4. Message-ID: <1995Dec31.214954.7369@venus.gov.bc.ca>
  5. From: dafriese@net.gov.bc.ca
  6. Date: 31 Dec 95 21:49:54 PST
  7. Reply-To: dafriese@islandnet.com
  8. References: <DKA17z.8u9@midway.uchicago.edu> <4bte7b$ss4@klein.delphi.com>
  9. Nntp-Posting-Host: vicsd218.dial.gov.bc.ca
  10. X-Newsreader: IBM NewsReader/2 v1.2.5
  11.  
  12. In <4bte7b$ss4@klein.delphi.com>, Jeff Hennick <jhennick@mci.newscorp.com> writes:
  13. >jmstieni@woodlawn.uchicago.edu (John Stiening) wrote:
  14. >>
  15. >>    I've been experimenting with both Vis/Pro Rexx and Watcom rexx for 
  16. >>the last week now, and I still can't figure out how to work with variables. What I would liek to do is port some of my visual basic programs to os/2 with
  17. >>some visual rexx varient.
  18.  
  19. ..
  20.  
  21. >
  22. >(BTW, tails do NOT have to be sequential, or even numeric.  So
  23. >
  24. >array.MAX = 3
  25. >
  26. >is just a legal, and works so long as the variable MAX is not assigned 
  27. >some other value.)
  28. >
  29. >
  30.  
  31. It is safest to adopt a 'standard' for yourself to pre-fix all non-variable stem
  32. index items with a special character.  I picked that up from someone, and use
  33. his convention.  Any non-variable stem index begins with '!', e.g.  
  34.  
  35. Array.!max
  36.  
  37. I never use '!' as the first character of a variable, so I'm safe.  The stem
  38. in REXX is a combination of an array, a record structure and a b-tree database.
  39.  
  40. E.G.
  41.  
  42. strings. = 0
  43. x = 'Any old string'
  44. strings.x = 1
  45. y = 'Any old string'
  46. if strings.y then say " 'Any old string' can be an index for a stem"
  47.  
  48. Stems are EXTREMELY flexible and useful.
  49.